package com.zyh.contract.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zyh.common.annotation.Excel;
import com.zyh.common.core.domain.BaseEntity;
import com.zyh.payment.domain.RentPayment;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 租赁管理对象 rental_contract
 * 
 * @author zyh
 * @date 2025-06-16
 */
public class RentalContract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 合同ID */
    private Long id;

    /** 房源ID */
    private Long houseId;

    /** 租客ID */
    private Long tenantId;

    /** 开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /** 月租金 */
    @Excel(name = "月租金")
    private BigDecimal monthlyRent;

    /** 押金 */
    @Excel(name = "押金")
    private BigDecimal deposit;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 支付管理信息 */
    private List<RentPayment> rentPaymentList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setHouseId(Long houseId) 
    {
        this.houseId = houseId;
    }

    public Long getHouseId() 
    {
        return houseId;
    }

    public void setTenantId(Long tenantId) 
    {
        this.tenantId = tenantId;
    }

    public Long getTenantId() 
    {
        return tenantId;
    }

    public void setStartDate(Date startDate) 
    {
        this.startDate = startDate;
    }

    public Date getStartDate() 
    {
        return startDate;
    }

    public void setEndDate(Date endDate) 
    {
        this.endDate = endDate;
    }

    public Date getEndDate() 
    {
        return endDate;
    }

    public void setMonthlyRent(BigDecimal monthlyRent) 
    {
        this.monthlyRent = monthlyRent;
    }

    public BigDecimal getMonthlyRent() 
    {
        return monthlyRent;
    }

    public void setDeposit(BigDecimal deposit) 
    {
        this.deposit = deposit;
    }

    public BigDecimal getDeposit() 
    {
        return deposit;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public List<RentPayment> getRentPaymentList()
    {
        return rentPaymentList;
    }

    public void setRentPaymentList(List<RentPayment> rentPaymentList)
    {
        this.rentPaymentList = rentPaymentList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("houseId", getHouseId())
            .append("tenantId", getTenantId())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("monthlyRent", getMonthlyRent())
            .append("deposit", getDeposit())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("rentPaymentList", getRentPaymentList())
            .toString();
    }
}
